System for data replication using redundant pairs of storage controllers, fibre channel fabrics and links therebetween

ABSTRACT

A data replication system having a redundant configuration including dual Fibre Channel fabric links interconnecting each of the components of two data storage sites, wherein each site comprises a host computer and associated data storage array, with redundant array controllers and adapters. Each array controller in the system is capable of performing all of the data replication functions, and each host ‘sees’ remote data as if it were local. Each array controller has a dedicated link via a fabric to a partner on the remote side of the long-distance link between fabric elements. Each dedicated link does not appear to any host as an available link to them for data access; however, it is visible to the partner array controllers involved in data replication operations. These links are managed by each partner array controller as if being ‘clustered’ with a reliable data link between them.

FIELD OF THE INVENTION

The present invention relates generally to error recovery in datastorage systems, and more specifically, to a system for providingcontroller-based remote data replication using a redundantly configuredFibre Channel Storage Area Network to support data recovery after anerror event which causes loss of data access at the local site due to adisaster at the local site or a catastrophic storage failure.

BACKGROUND OF THE INVENTION AND PROBLEM

It is desirable to provide the ability for rapid recovery of user datafrom a disaster or significant error event at a data processingfacility. This type of capability is often termed ‘disaster tolerance’.In a data storage environment, disaster tolerance requirements includeproviding for replicated data and redundant storage to support recoveryafter the event. In order to provide a safe physical distance betweenthe original data and the data to backed up, the data must be migratedfrom one storage subsystem or physical site to another subsystem orsite. It is also desirable for user applications to continue to runwhile data replication proceeds in the background. Data warehousing,‘continuous computing’, and Enterprise Applications all require remotecopy capabilities.

Storage controllers are commonly utilized in computer systems tooff-load from the host computer certain lower level processing functionsrelating to I/O operations, and to serve as interface between the hostcomputer and the physical storage media. Given the critical role playedby the storage controller with respect to computer system I/Operformance, it is desirable to minimize the potential for interruptedI/O service due to storage controller malfunction. Thus, prior workersin the art have developed various system design approaches in an attemptto achieve some degree of fault tolerance in the storage controlfunction.

One prior method of providing storage system fault toleranceaccomplishes failover through the use of two controllers coupled in anactive/passive configuration. During failover, the passive controllertakes over for the active (failing) controller. A drawback to this typeof dual configuration is that it cannot support load balancing, as onlyone controller is active and thus utilized at any given time, toincrease overall system performance. Furthermore, the passive controllerpresents an inefficient use of system resources.

Another approach to storage controller fault tolerance is based on aprocess called ‘failover’. Failover is known in the art as a process bywhich a first storage controller, coupled to a second controller,assumes the responsibilities of the second controller when the secondcontroller fails. ‘Failback’ is the reverse operation, wherein thesecond controller, having been either repaired or replaced, recoverscontrol over its originally-attached storage devices. Since eachcontroller is capable of accessing the storage devices attached to theother controller as a result of the failover, there is no need to storeand maintain a duplicate copy of the data, i.e., one set stored on thefirst controller's attached devices and a second (redundant) copy on thesecond controller's devices.

U.S. Pat. No. 5,274,645 (Dec. 28, 1993), to Idleman et al. discloses adual-active configuration of storage controllers capable of performingfailover without the direct involvement of the host. However, thedirection taken by Idleman requires a multi-level storage controllerimplementation. Each controller in the dual-redundant pair includes atwo-level hierarchy of controllers. When the first level orhost-interface controller of the first controller detects the failure ofthe second level or device interface controller of the secondcontroller, it re-configures the data path such that the data isdirected to the functioning second level controller of the secondcontroller. In conjunction, a switching circuit re-configures thecontroller-device interconnections, thereby permitting the host toaccess the storage devices originally connected to the failed secondlevel controller through the operating second level controller of thesecond controller. Thus, the presence of the first level controllersserves to isolate the host computer from the failover operation, butthis isolation is obtained at added controller cost and complexity.

Other known failover techniques are based on proprietary buses. Thesetechniques utilize existing host interconnect “hand-shaking” protocols,whereby the host and controller act in cooperative effort to effect afailover operation. Unfortunately, the “hooks” for this and other typesof host-assisted failover mechanisms are not compatible with morerecently developed, industry-standard interconnection protocols, such asSCSI, which were not developed with failover capability in mind.Consequently, support for dual-active failover in these proprietary bustechniques must be built into the host firmware via the host devicedrivers. Because SCSI, for example, is a popular industry standardinterconnect, and there is a commercial need to support platforms notusing proprietary buses, compatibility with industry standards such asSCSI is essential. Therefore, a vendor-unique device driver in the hostis not a desirable option.

U.S. patent application Ser. No. 08/071,710, to Sicola et al., describesa dual-active, redundant storage controller configuration in which eachstorage controller communicates directly with the host and its ownattached devices, the access of which is shared with the othercontroller. Thus, a failover operation may be executed by one of thestorage controller without the assistance of an intermediary controllerand without the physical reconfiguration of the data path at the deviceinterface. However, the technology disclosed in Sicola is directedtoward a localized configuration, and does not provide for datareplication across long distances.

U.S. Pat. No. 5,790,775 (Aug. 4, 1998) to Marks et al., discloses asystem comprising a host CPU, a pair of storage controllers in adual-active, redundant configuration. The pair of storage controllersreside on a common host side SCSI bus, which serves to couple eachcontroller to the host CPU. Each controller is configured by a systemuser to service zero or more, preferred host side SCSI IDs, each hostside ID associating the controller with one or more units locatedthereon and used by the host CPU to identify the controller whenaccessing one of the associated units. If one of the storage controllersin the dual-active, redundant configuration fails, the surviving one ofthe storage controllers automatically assumes control of all of the hostside SCSI IDs and subsequently responds to any host requests directed tothe preferred, host side SCSI IDS and associated units of the failedcontroller. When the surviving controller senses the return of the othercontroller, it releases to the returning other controller control of thepreferred, SCSI IDS of the failed controller.

In another aspect of the Marks invention, the failover is made to appearto the host CPU as simply a re-initialization of the failed controller.Consequently, all transfers outstanding are retried by the host CPUafter time outs have occurred. Marks discloses ‘transparent failover’which is an automatic technique that allows for continued operation by apartner controller on the same storage bus as the failed controller.This technique is useful in situations where the host operating systemtrying to access storage does not have the capability to adequatelyhandle multiple paths to the same storage volumes. Transparent failovermakes the failover event look like a ‘power-on reset’ of the storagedevice. However, transparent failover has a significant flaw: it is notfault tolerant to the storage bus. If the storage bus fails, all accessto the storage device is lost.

U.S. Pat. No. 5,768,623 (Jun. 16, 1998) to Judd et al., describes asystem for storing data for a plurality of host computers on a pluralityof storage arrays so that data on each storage array can be accessed byany host computer. There is an adapter communication interface(interconnect) between all of the adapters in the system to providepeer-to-peer communications. Each host has an adapter which providescontroller functions for a separate array designated as a primary array(i.e., each adapter functions as an array controller). There are also aplurality of adapters that have secondary control of each storage array.A secondary adapter controls a designated storage array when an adapterprimarily controlling the designated storage array is unavailable. Theadapter communication interface interconnects all adapters, includingsecondary adapters. Interconnectivity of the adapters is provided by aSerial Storage Architecture (SSA) which includes SCSI as a compatiblesubset. Judd indicates that the SSA network could be implemented withvarious topologies including a switched configuration.

However, the Judd system elements are interconnected in a configurationthat comprises three separate loops, one of which requires four separatelinks. Therefore, this configuration is complex from a connectivitystandpoint, and has disadvantages in areas including performance,physical cabling, and the host involvement required to implement thetechnique. The performance of the Judd invention for data replicationand failover is hindered by the ‘bucket brigade’ of latency to replicatecontrol information about commands in progress and data movement ingeneral. The physical nature of the invention requires many cables andinterconnects to ensure fault tolerance and total interconnectivity,resulting in a system which is complex and error prone. The tie-in withhost adapters is host operating system (O/S) dependent on an O/Splatform-by-platform basis, such that the idiosyncrasies of eachplatform must be taken into account for each different O/S to be usedwith the Judd system.

Therefore, there is a clearly felt need in the art for a disastertolerant data storage system capable of performing data backup andautomatic failover and failback without the direct involvement of thehost computer; and wherein all system components are visible to eachother via a redundant network which allows for extended clustering wherelocal and remote sites share data across the network.

SOLUTION TO THE PROBLEM

Accordingly, the above problems are solved, and an advance in the fieldis accomplished by the system of the present invention which provides acompletely redundant configuration including dual Fibre Channel fabriclinks interconnecting each of the components of two data storage sites,wherein each site comprises a host computer and associated data storagearray, with redundant array controllers and adapters. The present systemis unique in that each array controller is capable of performing all ofthe data replication functions, and each host ‘sees’ remote data as ifit were local.

The ‘mirroring’ of data for backup purposes is the basis for RAID(‘Redundant Array of Independent [or Inexpensive] Disks’) Level 1systems, wherein all data is replicated on N separate disks, with Nusually having a value of 2. Although the concept of storing copies ofdata at a long distance from each other (i.e., long distance mirroring)is known, the use of a switched, dual-fabric, Fibre Channelconfiguration as described herein is a novel approach to disastertolerant storage systems. Mirroring requires that the data be consistentacross all volumes. In prior art systems which use host-based mirroring(where each host computer sees multiple units), the host maintainsconsistency across the units. For those systems which employcontroller-based mirroring (where the host computer sees only a singleunit), the host is not signaled completion of a command until thecontroller has updated all pertinent volumes. The present invention is,in one aspect, distinguished over the previous two types of systems inthat the host computer sees multiple volumes, but the data replicationfunction is performed by the controller. Therefore, a mechanism isrequired to communicate the association between volumes to thecontroller. To maintain this consistency between volumes, the system ofthe present invention provides a mechanism of associating a set ofvolumes to synchronize the logging to the set of volumes so that whenthe log is consistent when it is “played back” to the remote site.

Each array controller in the present system has a dedicated link via afabric to a partner on the remote side of the long-distance link betweenfabric elements. Each dedicated link does not appear to any host as anavailable link to them for data access; however, it is visible to thepartner array controllers involved in data replication operations. Theselinks are managed by each partner array controller as if being‘clustered’ with a reliable data link between them.

The fabrics comprise two components, a local element and a remoteelement. An important aspect of the present invention is the fact thatthe fabrics are ‘extended’ by standard e-ports (extension ports). Theuse of e-ports allow for standard Fibre Channel cable to be run betweenthe fabric elements or the use of a conversion box to covert the data toa form such as telco ATM or IP. The extended fabric allows the entiresystem to be viewable by both the hosts and storage.

The dual fabrics, as well as the dual array controllers, dual adaptersin hosts, and dual links between fabrics, provide high-availability andpresent no single point of failure. A distinction here over the priorart is that previous systems typically use other kinds of links toprovide the data replication, resulting in the storage not being readilyexposed to hosts on both sides of a link. The present configurationallows for extended clustering where local and remote site hosts areactually sharing data across the link from one or more storage subystemswith dual array controllers within each subsystem.

The present system is further distinguished over the prior art by otheradditional features, including independent discovery of initiator totarget system and automatic rediscovery after link failure. In addition,device failures, such as controller and link failures, are detected by‘heartbeat’ monitoring by each array controller. Furthermore, no specialhost software is required to implement the above features because allreplication functionality is totally self contained within each arraycontroller and automatically done without user intervention.

An additional aspect of the present system is the ability to functionover two links with data replication traffic. If failure of a linkoccurs, as detected by the ‘initiator’ array controller, that arraycontroller will automatically ‘failover’, or move the base of datareplication operations to its partner controller. At this time, alltransfers in flight are discarded, and therefore discarded to the host.The host simply sees a controller failover at the host OS (operatingsystem) level, causing the OS to retry the operations to the partnercontroller.

The array controller partner continues all ‘initiator’ operations fromthat point forward. The array controller whose link failed willcontinuously watch that status of its link to the same controller on theother ‘far’ side of the link. That status changes to a ‘good’ link whenthe array controllers have established reliable communications betweeneach other. When this occurs, the array controller ‘initiator’ partnerwill ‘failback’ the link, moving operations back to newly reliable link.This procedure re-establishes load balance for data replicationoperations automatically, without requiring additional features in thearray controller or host beyond what is minimally required to allowcontroller failover.

BRIEF DESCRIPTION OF THE DRAWINGS

The above objects, features and advantages of the present invention willbecome more apparent from the following detailed description taken inconjunction with the accompanying drawings, in which:

FIG. 1 is a diagram showing long distance mirroring;

FIG. 2 illustrates a switched dual fabric, disaster-tolerant storagesystem;

FIG. 3 is a block diagram of the system shown in FIG. 2;

FIG. 4 is a high-level diagram of a remote copy set operation;

FIG. 5 is a block diagram showing exemplary controller softwarearchitecture;

FIG. 6A is a flow diagram showing inter-site controller heartbeat timeroperation;

FIG. 6B is a flow diagram showing intra-site controller heartbeat timeroperation;

FIG. 7 is a flowchart showing synchronous system operation;

FIG. 8A is a flowchart showing asynchronous system operation;

FIG. 8B is a flowchart showing a ‘micro-merge’ operation; and

FIG. 9 is a diagram showing an example of a link failover operation.

DETAILED DESCRIPTION

The system of the present invention comprises a data backup and remotecopy system which provides disaster tolerance. In particular, thepresent system provides a redundant peer-to-peer remote copy functionwhich is implemented as a controller-based replication of one or moreLUNs (Logical Unit Numbers) between two separate pairs of arraycontrollers.

FIG. 1 is a diagram showing long distance mirroring, which is anunderlying concept of the present invention. The present system 100employs a switched, dual-fabric, Fibre Channel configuration to provide,a disaster tolerant storage system. Fibre Channel is the general name ofan integrated set of standards developed by the American NationalStandards Institute (ANSI) which defines protocols for informationtransfer. Fibre Channel supports multiple physical interface types,multiple protocols over a common physical interface, and a means forinterconnecting various interface types. A ‘Fibre Channel’ may includetransmission media such as copper coax or twisted pair copper wires inaddition to (or in lieu of) optical fiber.

As shown in FIG. 1, when host computer 101 writes data to its localstorage array, an initiating node, or ‘initiator’ 111 sends a backupcopy of the data to remote ‘target’ node 112 via a Fibre Channelswitched fabric 103. A ‘fabric’ is a topology (explained in more detailbelow) which supports dynamic interconnections between nodes throughports connected to the fabric. In FIG. 1, nodes 111 and 112 areconnected to respective links 105 and 106 via ports 109. A node issimply a device which has at least one port to provide access externalto the device. In the context of the present system 100, a nodetypically includes an array controller pair and associated storagearray. Each port in a node is generically termed an N (or NL) port.Ports 109 (array controller ports) are thus N ports. Each port in afabric is generically termed an F (or FL) port. In FIG. 1, links 105 and106 are connected to switched fabric 103 via F ports 107. Morespecifically, these F ports may be standard E ports (extension ports) orE port/FC-BBport pairs, as explained below.

In general, it is possible for any node connected to a fabric tocommunicate with any other node connected to other F ports of thefabric, using services provided by the fabric. In a fabric topology, allrouting of data frames is performed by the fabric, rather than by theports. This any-to-any connection service (‘peer-to-peer’ service)provided by a fabric is integral to a Fibre Channel system. It should benoted that in the context of the present system, although a second hostcomputer 102 is shown (at the target site) in FIG. 1, this computer isnot necessary for operation of the system 100 as described herein.

An underlying operational concept employed by the present system 100 isthe pairing of volumes (or LUNs) on a local array with those on a remotearray. The combination of volumes is called a Remote Copy Set. A RemoteCopy Set thus consists of two volumes, one on the local array, and oneon the remote array. For example, as shown in FIG. 1, a Remote Copy Setmight consist of LUN 1 (110) on a storage array at site 101 and LUN 1′(110′) on a storage array at site 102. The array designated as the‘local’ array is called the initiator, while the remote array is calledthe target. Various methods for synchronizing the data between the localand remote array are possible in the context of the present system.These synchronization methods range from full synchronous to fullyasynchronous data transmission, as explained below. The system user'sability to choose these methods provides the user with the capability tovary system reliability with respect to potential disasters and therecovery after such a disaster. The present system allows choices to bemade by the user based on factors which include likelihood of disastersand the critical nature of the user's data.

System Architecture

FIG. 2 illustrates an exemplary configuration of the present invention,which comprises a switched dual fabric, disaster-tolerant storage system100. The basic topology of the present system 100 is that of aswitched-based Storage Area Network (SAN). As shown in FIG. 2, datastorage sites 218 and 219 each respectively comprise two hosts 101/101Aand 102/102A, and two storage array controllers 201/202 and 211/212connected to storage arrays 203 and 213, respectively. Alternatively,only a single host 101/102, or more than two hosts may be connected tosystem 100 at each site 218/219. Storage arrays 203 and 213 typicallycomprise a plurality of magnetic disk storage devices, but could alsoinclude or consist of other types of mass storage devices such assemiconductor memory.

In the configuration of FIG. 2, each host at a particular site isconnected to both fabric elements (i.e., switches) located at thatparticular site. More specifically, at site 218, host 101 is connectedto switches 204 and 214 via respective paths 231A and 231B; host 101A isconnected to the switches via paths 241A and 241B. Also located at site218 are array controllers A1 (ref. no. 201) and A2 (ref. no. 202). Arraycontroller A1 is connected to switch 204 via paths 221H and 221D; arraycontroller A2 is connected to switch 214 via paths 222H and 222D. Thepath suffixes ‘H’ and ‘D’ refer to ‘Host’ and ‘Disaster-tolerant’ paths,respectively, as explained below. Site 219 has counterpart arraycontrollers B1 (ref. no 211) and B2 (ref. no. 212), each of which isconnected to switches 205 and 215. Note that array controllers B1 and B2are connected to switches 205 and 215 via paths 251D and 252D, whichare, in effect, continuations of paths 221D and 222D, respectively.

In the present system shown in FIG. 2, all storage subsystems(203/204/205 and 213/214/215) and all hosts (101, 101A, 102, and 102A)are visible to each other over the SAN 103A/103B. This configurationprovides for high availability with a dual fabric, dual host, and dualstorage topology, where a single fabric, host, or storage can fail andthe system can still continue to access other system components via theSAN. As shown in FIG. 2, each fabric 103A/103B employed by the presentsystem 100 includes two switches interconnected by a high-speed link.More specifically, fabric 103A comprises switches 204 and 205 connectedby link 223A, while fabric 103B comprises switches 214 and 215 connectedby link 223B.

Basic Fibre Channel technology allows the length of links 223A/223B(i.e., the distance between data storage sites) to be as great as 10 KMas per the FC-PH3 specification (see Fibre Channel Standard: FibreChannel Physical and Signaling Interface, ANSII X3T11). However,distances of 20 KM and greater are possible given improved technologyand FC-PH margins with basic Fibre Channel. FC-BB (Fibre ChannelBackbone) technology provides the opportunity to extend Fibre Channelover leased Telco lines (also called WAN tunneling). In the case whereinFC-BB is used for links 223A and 223B, FC-BB ports are attached to the Eports to terminate the ends of links 223A and 223B.

It is also possible to interconnect each switch pair 204/205 and 214/215via an Internet link (223A/223B). If the redundant links 223A and 223Bbetween the data storage sites 218/219 are connected to different ISPs(Internet Service Providers) at the same site, for example, there is ahigh probability of having at least one link operational at any giventime. This is particularly true because of the many redundant pathswhich are available over the Internet between ISPs. For example,switches 204 and 214 could be connected to separate ISPs, and switches205 and 215 could also be connected to separate ISPs.

FIG. 3 is an exemplary block diagram illustrating additional details ofthe system shown in FIG. 2. The configuration of the present system 100,as shown in FIG. 3, depicts only one host per site for the sake ofsimplicity. Each host 101/102 has two adapters 308 which support thedual fabric topology. The hosts typically run multi-pathing softwarethat dynamically allows failover between storage paths as well as staticload balancing of storage volumes (LUNs) between the paths to thecontroller-based storage arrays 201/202 and 211/212. The configurationof system 100 allows for applications using either of the storage arrays203/213 to continue running given any failure of either fabric 103A/103Bor either of the storage arrays.

The array controllers 201/202 and 211/212 employed by the present system100 have two host ports 109 per array controller, for a total of fourconnections (ports) per pair in the dual redundant configuration of FIG.3. Each host port 109 preferably has an optical attachment to theswitched fabric, for example, a Gigabit Link Module (‘GLM’) interface atthe controller, which connects to a Gigabit Converter (‘GBIC’) modulecomprising the switch interface port 107. Switch interconnection ports306 also preferably comprise GBIC modules. Each pair of arraycontrollers 201/202 and 211/212 (and associated storage array) is alsocalled a storage node (e.g., 301 and 302), and has a unique FibreChannel Node Identifier. As shown in FIG. 3, array controller pair A1/A2comprise storage node 301, and array controller pair B1/B2 comprisestorage node 302. Furthermore, each storage node and each port on thearray controller has a unique Fibre Channel Port Identifier, such as aWorld-Wide ID (WWID). In addition, each unit connected to a given arraycontroller also has a WWID, which is the storage node's WWID with anincrementing ‘incarnation’ number. This WWID is used by the host's O/Sto allow the local and remote units to be viewed as the ‘same’ storage.

The array controllers'ports 109 are connected somewhat differently thantypical dual controller/adapter/channel configurations. Normally, thecontroller ports'connections to dual transmission channels arecross-coupled, i.e., each controller is connected to both channels.However, in the present system configuration 100, both ports on arraycontroller A1, for example, attach directly to a single fabric viaswitch 204. Likewise, both ports on array controller A2 attach directlyto the alternate fabric, via switch 214. The exact same relativeconnections exist between array controllers B1/B2 and their respectiveswitches 205/215 and associated fabrics. One port of each controller isthe ‘host’ port that will serve LUN(s) to the local host 101/102. Theother port of each controller is the ‘remote copy’ port, used fordisaster tolerant backup.

Remote Copy Sets

FIG. 4 is a high-level diagram of a Remote Copy Set operation. Thepresent system 100 views volumes (or LUNs) on a local array as beingpaired with counterpart volumes on a remote array. A Remote Copy Set iscomprised of two volumes, one on the local array, and one on the remotearray. When a local host computer 101, for example, requests a storagearray I/O operation, the local array controller, or ‘initiator’ 301,presents a local volume that is part of the Remote Copy Set to the localhost. The host 101 performs writes to the local volume on the localarray 203 , which copies the incoming write data to the remote volume onthe target array 213.

As shown in FIG. 4, two LUNs (logical units), LUN X (410) and LUN X′(410′), attached to controllers B1/B2 (302) and A1/A2 (301),respectively, are bound together as a Remote Copy Set 401. A Remote CopySet (RCS), when added on array 203, points to array 213, and will causethe contents of the local RCS member on array 203 to be immediatelycopied to the remote RCS member on array 213. When the copy is complete,LUN X′ (410′) on array 213 is ready to be used as a backup device. Inorder to preserve the integrity of the backup copy, local host 101access to LUN 410′ is not allowed during normal operations.

Software Architecture

FIG. 5 is a block diagram showing exemplary array controller softwarearchitecture employed by the present system 100. As shown in FIG. 5,peer-to-peer remote copy software (‘PPRC manager’) 515 is layered inbetween host port initiator module 510 and VA (‘Value Added’, such asRAID and caching) software module 520 within each controller(A1/A2/B1/B2). VA layer 520 is not aware of any PPRC manager 515 context(state change or transfer path). Host port target code 505 allows onlyhost initiators to connect to the controller port which is a dedicateddata replication port.

The PPRC manager module 515 uses containers and services that the VAlayer 520 exports. PPRC manager 515 uses interfaces between host portinitiator module 510 and VA module 520 for signaling, transferinitiation, and transfer completions. PPRC manager 515 is responsiblefor managing functions including initiating the connection and heartbeatwith the remote controller and initiating the remote copy for incominghost writes (via host port initiator 510); initiating I/O operations forperforming full copy, log, and merge; handling error recovery (linkfailover) and peer communication; and maintaining state information.Device Services layer 525 handles the physical I/O to external devicesincluding the local data storage array and switch.

Inter-Site Controller Heartbeat Timer Operation

FIG. 6A is an exemplary flow diagram showing the operation of two of thearray controller ‘heartbeat’ timers. The operation described in FIG. 6Ais best understood in conjunction with reference to the systemarchitecture shown in FIGS. 2 and 3. In the embodiment described in FIG.6A, during the course of normal system operation, host computer 101sends requests to write data to array 203 via controller A1 (201). Atstep 600, in response to a write request, array controller A1 sends awrite command and the host write data to target array controller B1 viafabric 103A (referred to as ‘link 1” in FIG. 6), so that the data isbacked up on array 213. At step 605, controller A1 starts a command(‘heartbeat’) timer which keeps track of the time between issuance ofthe write command and a response from the target controller B1. If link1 and controller B1 are operational, then controller B1 writes the datato array 213 and, at step 610, sends an acknowledgement (‘ACK’) back tocontroller A1 via link 1, indicating successful completion of thecommand.

Asynchronously with respect to the command timer described above, atstep 601, controller A1 may also periodically send a Fibre Channel‘echo’ extended link service command to controller B1 via link 1. In oneembodiment of the present system, the link echo is sent every 10seconds; however, the exact frequency of the echoes is not critical, noris it necessary to have the echoes synchronized with any specificsource. At step 603, controller A1 sets a second ‘heartbeat’ timer orcounter, which can simply be a counter which counts-down using a clockto keep track of the time elapsed since the sending of the link echo. Atstep 610, in the normal course of operation, controller A1 receives an‘ACK’ from controller B1, indicating that link 1 is operational. Thecommand and link timers are preferably set to time out at intervalswhich are best suited for the cross-link response time betweencontrollers A1 and B1. It is to be noted that a single inter-sitelink/command timer may be employed in lieu of the two timers describedabove. A periodic ‘echo’ and associated timer may entirely supplant thecommand timer, or, alternatively, the echo timer may be replaced by theuse of a single timer to ensure that each command sent over eachinter-site link is responded to within a predetermined time.

At step 615, due to a failure of link 1 or controller B1, at least oneof two situations has occurred—(1) controller A1's command timer hastimed out, or (2) controller A1's link timer has timed out. In eitherevent, a link failover operation is initiated. At step 620, controllerA1 transfers control to controller A2, causing A2 to assume control ofbackup activities. Next, at step 625, controller A2 proceeds to back updata on storage array 213 by communicating with controller B2 via link 2(fabric 103B). Since controller B2 shares storage array 213 withcontroller B1, at step 630, B2 now has access to the volume (e.g., LUNX′) which was previously created by controller B1 with data sent fromcontroller A1. The failover process is further described below withrespect to FIG. 6B.

Intra-Site Controller Heartbeat Timer Operation

FIG. 6B is a flow diagram showing the operation of controller-based‘heartbeat’ timers, wherein a controller failover operation is effectedby a ‘surviving’ controller. In the example illustrated in FIG. 6B,controllers A1 (201) and A2 (202) are interchangeably represented by theletters ‘C’ and ‘C!’, where “C!” represents C's ‘companion’ controller,i.e., where controller C can be either controller A1 or A2, andcontroller C! is the companion controller A2 or A1, respectively. Thisterminology is chosen to illustrate the symmetrical relationship betweenthe two controllers. In the present example, the data from host computer101 is sent over C's link (e.g., link 1) to a backup volume (e.g., LUNX) via its counterpart controller (e.g., controller B1) at the remotetarget site.

Initially, at step 635, controllers C and C! set a ‘controllerheartbeat’ timer or counter to keep track of the time elapsed betweenreceiving consecutive heartbeat signals (hereinafter referred to as‘pings’) from the other controller. The controller heartbeat timer isset to time out at a predetermined interval, which allows for aworst-case elapsed time between receiving two consecutive pings from theother controller. Next, during normal operation, at step 640,controllers C and C! periodically send pings to each other via DUARTs(Dual Asynchronous Receiver/Transmitters) located at both ends of bus330. Assuming that neither controller C nor controller C!'s heartbeattimer has timed out, at step 643, both controllers C and C!receive aping from their companion controller. Both controllers then reset theirheartbeat timers at step 645, and each controller awaits another pingfrom its companion controller.

In the situation where, for example, controller C fails (step 647),allowing controller C!'s heartbeat timer to time out (at step 650),then, at step 655, controller C! initiates a controller failoveroperation to move the target LUN on remote storage array to the othercontroller (e.g., from controller B1 to controller B2). At step 660,controller C! proceeds by sending backup data to alternate controller(e.g., controller B2) via the alternate link (e.g., link 2). At thispoint, controller C! has access to the backup volume (e.g., LUN X′) onarray 213.

Connection Setup

When a remote copy set is bound, connection setup is initiated. In aswitched Fibre Channel environment, an initiator controller's host portinitiator module 510 (FIG. 5) performs discovery to ‘find’ the targetcontroller. The host port module 510 must use the Fabric's FC-NameServerin order to find controllers which are part of the present system 100.Initially, the user specifies a “target name” which uniquely identifiesthe remote controller and unit. Once the connection has been setup, afull copy from the initiator unit to the target unit is initiated. Thetarget's data is protected from host access, by the user pre-settingaccess IDs.

Steady State Operation

The steady state operation is possible in two modes, synchronous orasynchronous. When the present system 100 is in synchronous mode, theremote data is consistent with the local data. All commands that arereturned to the host as completed, are completed on both the initiatorand the target. When system 100 is in asynchronous mode, the remote sitemay lag behind by a bounded number of write I/O operations. All commandsthat are returned to the host as completed, are completed on theinitiator, and may or may not be completed on the target. From arecovery viewpoint the only difference between the operation modes isthe level of currency of target members.

Synchronous System Operation

FIG. 7 is a flowchart showing synchronous system operation. Insynchronous operation mode, data is written simultaneously to localcontroller cache memory (or directly to local media if the write requestis a write-through command), as well as to the remote subsystems, inreal time, before the application I/O is completed, thus ensuring thehighest possible data consistency. Synchronous replication isappropriate when this exact consistency is critical to an applicationsuch as a banking transaction. A drawback to synchronous operation isthat long distances between sites mean longer response times, due to thetransit time, which might reach unacceptable latency levels, althoughthis situation is somewhat mitigated by write-back cache at the target.Asynchronous operation, described in the following section, may improvethe response time for long-distance backup situations.

Steady state synchronous operation of system 100 proceeds with thefollowing sequence. As shown in FIG. 7, at step 701, host computer 101issues a write command to local controller A1 (201), which receives thecommand at host port 109 over path 221 h at step 705. At step 710, thecontroller passes the write command down to the VA level software 530(FIG. 5) as a normal write. At step 715, VA 530 writes the data into itswrite-back cache through the normal cache manager path (i.e., throughthe device services layer 525). On write completion, VA 530 retains thecache lock and calls the PPRC manager 515. At step 720, PPRC manager 515sends the write data to remote target controller B1 (211) via host portinitiator module 510. The data is sent through the remote copy dedicatedhost port 109 via path 221D, and across fabric 103A. Next, at step 725,remote target controller B1 writes data to its write-back cache (ordirectly to media if a write through operation). Then, at step 730,controller B1 sends the completion status back to initiator controllerA1. Once PPRC manager 515 in controller A1 has received a completionstatus from target controller, it notifies VA 530 of the completion, atstep 735. At step 740, VA 530 completes the write in the normal path(media write if write through), releases the cache lock, and completesthe present operation at step 745 by sending a completion status to thehost 101. The cache lock is released by the last entity to use the data.In the case of a remote write, the cache is released by the PPRC managerupon write completion.

Asynchronous System Operation

FIG. 8A is a flowchart showing asynchronous operation the present system100. Asynchronous operation provides command completion to the hostafter the data is safe on the initiating controller, and prior tocompletion of the target command. During system operation, incoming hostwrite requests may exceed the rate at which remote copies to the targetcan be performed. Copies therefore can be temporarily out ofsynchronization, but over time that data will converge to the same atall sites. Asynchronous operation is useful when transferring largeamounts of data, such as during data center migrations orconsolidations.

Asynchronous operation of the present system 100 proceeds with thefollowing sequence. As shown in FIG. 8A, at step 801, host computer 101issues a write command to local controller A1 (201), which receives thecommand at host port 109 over path 221 h at step 805. At step 810, thecontroller passes the write command down to the VA level software 530(FIG. 5) as a normal write. At step 815, VA 530 writes the data into itswrite-back cache through the normal cache manager path (i.e., throughthe device services layer 525). On write completion, VA 530 retains thecache lock and calls the PPRC manager 515. At step 820, PPRC Manager“micro-logs” the write transfer LBN extent, as well as the commandsequence number and additional context in the controller's non-volatilewrite-back cache ‘micro-log’. This is done in all situations (not justin error situations), in case the initiator controller (A1) crashesafter status is returned to the host, but before the remote copycompletes. A small reserved area of cache is dedicated for themicro-log.

Micro-logging is done during steady state operation for eachasynchronous transfer, not just during error situations. The micro-loginformation is only used when the controller crashes with outstandingremote copies (or with outstanding logging unit writes). The micro-logcontains information to re-issue (‘micro-merge’) the remote copies byeither the ‘other’ controller (in this example, controller A2) uponcontroller failover, or when ‘this’ controller (A1) reboots, in thesituation wherein both controllers A1 and A2 are down.

At step 825, PPRC manager 515 calls back VA 530 to complete the hostwrite request, and the host is given the completion status. VA 530retains the cache lock and Data Descriptor data structure. At step 830,PPRC manager 515 (via host port initiator module 510) sends the writedata to the remote target. Order preserving context is also passed tohost port initiator module 510. At step 835, remote target controller B1(211) writes data to its write-back cache (or associated media if awrite-through operation). A check is then made by controller A1 at step840 to determine whether the remote copy successfully completed. If so,then, at step 845, target controller B1 sends the completion status backto initiator controller A1. At step 850, PPRC manager 515 marks themicro-log entry that the write has completed. The PPRC manager alsounlocks the controller cache and de-allocates the Data Descriptor.

If, at step 840, if it was determined that the remote copy operation didnot complete successfully, then at step 855, if the initiator controller(A1) failed while the remote copy was in transit, then a ‘micro-merge’operation (described below with respect to FIG. 8) is performed. If theremote copy was unsuccessful for other reasons, then at step 860, othererror recovery procedures (not part of the present disclosure) areinvoked.

FIG. 8B is a flowchart showing a ‘micro-merge’ operation. A micro-mergeoperation is applicable during asynchronous operation when thecontroller has failed in the window where the host write status hasalready been returned to the host, but where the remote copy operation(or write history log operation) has not completed. As indicated above,these ‘outstanding’ writes were logged to the initiator controller A1'swrite-back cache, which is also mirrored in partner controller A2's(mirrored) write-back cache, so that the cache data is available tocontroller A2 if controller A1 fails. If a controller failover has takenplace (as explained in the next section, below), then the partnercontroller (A2) re-issues these remote copies from the micro-log.Alternatively, if both controllers A1 and A2 are down, then controllerA1 itself re-issues these writes when it restarts.

The following sequence takes place in the controller duringmicro-merging mode. At step 865, access to the initiator unit by thehost is inhibited until the micro-merge is complete. At step 870, foreach valid entry in the micro-log in the controller write-back cache,the initiator unit is read at the LBN described. If the read has an FE(Forced Error), then the FE will be copied to the target (which ishighly unlikely, since the area was just written). If the read isunrecoverable, then the target member is removed, because it isimpossible to make the target consistent. If the read is successful, thedata is then written to the remote target member using the normal remotecopy path. Alternatively, if write history logging is active, the datais written to a log unit, as described below in the ‘Write HistoryLogging’ section.

In addition to command and LBN extent information, the micro-logcontains the command sequence number and additional context to issue thecommands in the same order received from the host. At step 875, if theremote copy of the entry was successful, then at step 880, the recordedentry in the micro-log is cleared, and the next entry is ‘re-played’, atstep 870. If the remote copy of the entry was not successful, then atstep 895, then error recovery procedures (not part of the presentdisclosure) are invoked. After completing all micro-merges (step 885),the initiator unit is made accessible to the host at step 890.

Link Failover

‘Link failover’ is recovery at the initiator site when one (of two)links has failed. Examples of a link failover situation are a targetcontroller rebooting, a switch failure, or an inter-site link failure.In a first situation, if the initiator controller has two consecutivefailed heartbeats and its dual partner has two consecutive successful‘heartbeats’, then a link failover is performed. It may also performedin a second situation wherein a remote write has failed due to a linkerror and its dual partner last had two successful heartbeats (a failedwrite is held for two successive heartbeats).

FIG. 9 is a diagram showing an example of a link failover operation. Asshown in FIG. 9, link 901 is lost to initiator controller A1. In thepresent example, controller A1 is in communication with partnercontroller A2, which indicates to A1 that A2's link 902 to controller B2is operational. In this situation, initiator controller A1 attempts linkfailover recovery procedures by attempting to communicate through itsdual redundant partner controller A2 and resume operations. In oneembodiment of the present system, a link failover is accomplished byrestarting (re-booting) controller A1, to force the initiator unit X onarray 203 from controller A1 to its partner controller A2. Once unit Xis moved over from controller A1 to controller A2 on the initiator side,controller A2 then ‘pulls’ target unit Y over to its dual redundantpartner B2 where controller A2 (the ‘new’ initiator) can access it. Linkfailover is not performed upon receiving SCSI errors (unit failures)from the remote unit, because the other controller will likely encounterthe same error. It is to be noted, that in the present embodiment, theinitiator controllers (A1 and A2) control the entire failover operation(the target controller, e.g., B2 is the slave).

Operations resume between controllers A2 and B2 if the previous stepswere successful. When link failover is successful, the host retries anywrites, similar to a controller failover event. Incoming writes duringthis time are not queued, but rather rejected, so the host will retrythem. If the link is restored, the host can move the unit back to theoriginal side.

Although the above description refers to specific embodiments of theinvention, the invention is not necessarily limited to the particularembodiments described herein. It is to be understood that various otheradaptations and modifications may be made within the spirit and scope ofthe invention as set forth in the appended claims.

We claim:
 1. A system for remote backup of data written by a hostcomputer to a first array of mass storage devices, the systemcomprising: a first site comprising components including: said hostcomputer; and a first array controller and a second array controller,operatively coupled to said first array of mass storage devices; asecond site comprising components including: a third array controllerand a fourth array controller, operatively coupled to a second array ofmass storage devices; a first switched fabric comprising: a first switchinterconnecting the components of said first site; a second switchinterconnecting the components of said second site; and a first Fibrechannel link connecting said first switch and said second switch; and asecond switched fabric comprising: a third switch interconnecting thecomponents of said first site; a fourth switch interconnecting thecomponents of said second site; and a second Fibre channel linkconnecting said third switch and said fourth switch; and wherein thefirst switched fabric and the second switched fabric are extended by Eports.
 2. The system of claim 1, wherein the first array controllerstores said data sent from the host computer in the first array, andalso sends the data to the third array controller via the first switchedfabric to cause the data to be backed up on the second array.
 3. Thesystem of claim 2, wherein: the first array controller establishesperiodic communication with the third array controller via the firstFibre channel link, and if the communication between the first arraycontroller and the third array controller fails, then the second arraycontroller sends the data to the fourth array controller via the secondFibre channel link to cause the data to be backed up on the secondarray.
 4. The system of claim 3, wherein said periodic communicationincludes a system echo sent from the first controller to the thirdcontroller, and an acknowledgement in,response to the echo, sent fromthe third controller to the first controller.
 5. The system of claim 1,wherein a first logical connection is established between the firstarray controller and the third array controller via the first switchedfabric, and in the event of failure of either the first switched fabricor the third array controller, then a second logical connection isestablished between the second array controller and the fourth arraycontroller via the second switched fabric to provide a path for backupof the data on the second array.
 6. The system of claim 5, wherein thefirst array controller initiates establishment of the second logicalconnection in response to said failure.
 7. The system of claim 1,further including two host ports per array controller, wherein each ofthe host ports is connected to a different said switch at each saidsite.
 8. The system of claim 7, wherein a storage node comprises anarray controller pair at each site, and wherein each storage node andeach port on each said array controller has a unique Fibre Channel PortIdentifier.
 9. The system of claim 8, wherein each unit on the firstarray and the second array has a unique identifier.
 10. A method forbackup, at a remote site, of data written by a host computer to a firstarray of mass storage device at a first site, the method comprising thesteps of; interconnecting said first site and said remote site via afirst switched Fibre channel fabric and a second switched Fibre channelfabric: wherein said first site comprises components including: saidhost computer; and a first array controller and a second arraycontroller, operatively coupled to said first array of mass storagedevices; and wherein said remote site comprises components including: athird array controller and a fourth array controller, operativelycoupled to a second array of mass storage devices; interconnecting atleast two of the components of the first site via a first switch coupledto the first switched Fibre channel fabric; interconnecting at least twoof the components of the second site via a second switch coupled to thefirst switched Fibre channel fabric; interconnecting at least twocomponents of the second site via a third switch coupled to the secondswitched Fibre channel fabric; interconnecting at least two of thecomponents of the second site via a fourth switch coupled to the secondswitched Fibre channel fabric; sending the data to the third arraycontroller via the first switched fabric to cause the data to be backedup on the second array; and establishing periodic communication betweenthe first array controller and the third array controller via the firstFibre channel link; wherein if the communication between the first arraycontroller and the third array controller fails, then sending the datafrom the second array controller to the fourth array controller via thesecond Fibre channel link to cause the data to be backed up on thesecond array; and wherein failover of the first Fibre channel link tothe second Fibre channel link is effected by the host computer inresponse to a signal from the first array controller.
 11. The method ofclaim 10, wherein failover of the first Fibre channel link to the secondFibre Channel link is effected by the first array controller.
 12. Themethod of claim 11, wherein, after said failover is effected, failbackof the second Fibre channel link to the first Fibre channel link iseffected by the first array controller in response to detection of thefirst Fibre channel link being operational.
 13. The method of claim 10,wherein the first switched fabric and the second switched fabric areextended by standard E ports.
 14. The method of claim 10, wherein eachsaid controller at the first site has two ports, including theadditional steps of: coupling one of the two ports on each saidcontroller at the first site to the host via the first switch; andcoupling the other of the two ports on each said controller at the firstsite to the host via the second switch.
 15. The method of claim 14,wherein a storage node comprises an array controller pair at each site,further including the step of assigning each storage node and each porton each said array controller a unique Fibre Channel Port Identifier.16. The method of claim 15, further including the step of assigning aunique identifier to each unit on the first array and the second array.